﻿<%@ Page Title="Delay start" Language="C#" MasterPageFile="~/Demo.master" Inherits="DemoPage"
    StylesheetTheme="start" %>

<%@ Register Src="~/CodeFormatter.ascx" TagName="Code" TagPrefix="demo" %>
<asp:Content ID="Content1" ContentPlaceHolderID="DemoHolder" runat="Server">
    <div class="dna-state-help ui-corner-all" style="margin-bottom: 10px;">
        Prevent accidental sorting either by delay (time) or distance. Set a number of milliseconds
        the controls needs to be dragged before sorting starts with the <b>DragStartDelay</b> property. Set
        a distance in pixels the control needs to be dragged before sorting starts with
        the <b>DragStartDistance</b> property
    </div>
    <br />
    <style type="text/css">
        .sortable { list-style-type: none; margin: 0; padding: 0; float: left; margin-right: 10px; width: 150px; }
        .sortable ul { list-style-type: none; margin: 0; padding: 0; margin-bottom: 15px; zoom: 1; }
        .sortable ul li { margin: 0 5px 5px 5px; padding: 5px; font-size: 9pt; width: 95%; }
        .sortable ul li span { position: absolute; margin-left: -1.3em; }
        .docs { clear: left; font-weight: normal; font-size: 12pt; margin: 0; padding: 0.5em 0 1em; }
    </style>
    <h3 class="docs">
        Time delay of 300ms:</h3>
    <DotNetAge:SimpleListView ID="SimpleListView1" runat="server" Items-Capacity="4"
        CssClass="ui-helper-reset sortable " ItemCssClass="ui-helper-reset ui-state-default ui-corner-all">
        <DotNetAge:SimpleListItem Text="Item1" />
        <DotNetAge:SimpleListItem Text="Item2" />
        <DotNetAge:SimpleListItem Text="Item3" />
    </DotNetAge:SimpleListView>
    <h3 class="docs">
        Distance delay of 15px:</h3>
    <DotNetAge:SimpleListView ID="SimpleListView2" runat="server" Items-Capacity="4"
        CssClass="ui-helper-reset sortable" ItemCssClass="ui-helper-reset ui-state-highlight ui-corner-all">
        <DotNetAge:SimpleListItem Text="Item1" />
        <DotNetAge:SimpleListItem Text="Item2" />
        <DotNetAge:SimpleListItem Text="Item3" />
    </DotNetAge:SimpleListView>
    <DotNetAge:Sortable ID="Sortable1" runat="server" DragStartDelay="300">
        <Target TargetIDs="SimpleListView1>ul" />
    </DotNetAge:Sortable>
    <DotNetAge:Sortable ID="Sortable2" runat="server" DragStartDistance="15">
        <Target TargetIDs="SimpleListView2>ul" />
    </DotNetAge:Sortable>
    <div style="clear: left; margin-top: 5px;">
    </div>
    <br />
    <demo:Code runat="server" ID="codeView" SourceFile="~/Sortable/Codes/DelayStart.aspx" />
</asp:Content>
